<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <meta name="format-detection"content="telephone=no, email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" /><!-- 删除苹果默认的工具栏和菜单栏 -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black" /><!-- 设置苹果工具栏颜色 -->
    <meta name="renderer" content="ie-comp">
    <meta name="renderer" content="ie-stand">
    <meta name="renderer" content="webkit"> 
    <meta name="keywords" content="耀盛中国,耀盛智投,理财产品,智选财富,耀盛智投官网"/>
    <meta name="description" content="耀盛智投为耀盛中国旗下理财产品智选平台。专注于为大众富裕阶层、精英个人、中产阶级家庭、合规机构等提供定制化资产配置咨询推荐服务，帮助客户实现财富的增值。" />
    <title>个人设置</title>
    <script src="../../lib/js/ftSize.js"></script>
    <link rel="stylesheet" href="../../lib/css/_base.css">
    <link rel="stylesheet" type="text/css" href="../../lib/css/personageset.css">
</head>
<body>
    <h1 class="rem90R"><img src="../../lib/images/left.png" class="leftImg" onClick="prevAttectation()">个人设置</h1>
    <ul class="personage_li">
        <li><span>手机号</span><i id="persetMobile"></i></li>
        <li id="persetAttest">
            <a href="../../login/attestation/index.html">
            <span>实名认证</span>
            <i>去认证<img src="../../lib/images/s_right.png"></i>
        </a></li>
        <!-- <li id="persetAttested"><a href="javascript:;">
                <span>实名认证</span>
                <i ><img src="../../lib/images/s_right.png"></i>
        </a></li> -->
        <li id="persetBank"><span>银行卡</span><i>未设置</i></li>
        <li style="border:none!important;"> <a href="exposureRating.html" style="border:none!important;">
            <span>风险评估</span>
            <i id="persetExposure">去评测<img src="../../lib/images/s_right.png"></i>
        </a></li>
    </ul>
    <ul class="personage_li" style="margin-top:0.2rem">
        <li><a href="modifyLogin.html"><span>登录密码</span><i>去修改<img src="../../lib/images/s_right.png"></i></a></li>
        <li style="border:none!important;" id="persetRestpay">
                <a href="../../login/attestation/index.html" ><span>支付密码</span><i>未设置<img src="../../lib/images/s_right.png"></i></a>
        </li>
    </ul>
    <div class="out_btn" onClick="clearLogin()">安全退出</div>
<script src="../../lib/js/jquery.min.js"></script>    
<script src="../../lib/js/public-header.js"></script> 

<script>   
let wpuserInfo = window.sessionStorage.getItem("wpuserInfo");//是否有登录信息
let wpcertFlag=window.sessionStorage.getItem('wpcertFlag');//实名认证 1:认证，2:未认证
let wpriskFlag =window.sessionStorage.getItem('wpriskFlag');//是否测评 1评测，2:未评测 实名认证 1:认证，2:未认证
  /* 我的账户信息 */
    function persontJson() {
        let wpuserToken = window.sessionStorage.getItem("wpuserToken");//tiken
        var json = {
            "faceCode":"user/getUserInfo",
            "token":wpuserToken,    
            "clientInfo":"W,100,IE8",  
            "requestTime": formatDateTime(startTime),
            "body":{}
        }
        return json;
    }
    //用户评测
    function RiskresultJson(usid) {
        let wpuserToken = window.sessionStorage.getItem("wpuserToken");//tiken
        var json = {
            "faceCode":"risk/getRiskResult",
            "token":wpuserToken,    
            "clientInfo":"W,100,IE8",  
            "requestTime": formatDateTime(startTime),
            "body":{}
        }
        return json;
    }

   //类型
if(wpuserInfo!=null){
    $.ajax({  
        type: "POST",
        url: httpServer+"user/getUserInfo",
        headers:{
            'Access-Control-Allow-Origin':'*'
        }, 
        contentType: "application/json; charset=utf-8",
        data: JSON.stringify(RiskresultJson()),
        dataType: "json",
        success: function (Riskresult) {  
            let riskType;
            switch (riskType)
                {
                case '00':
                riskType="保守型";
                break;
                case '01':
                riskType="稳健型";
                break;
                case '02':
                riskType="平衡型";
                break;
                case '03':
                riskType="成长型";
                break;
                case '04':
                riskType="进取型";
                break;
            }
           if( Riskresult.resCode!='0'){
                twoError(Riskresult)
           }else{//是否测评 1评测，2:未评测 实名认证 1:认证，2:未认证
                Riskresult=Riskresult.body;
                let userPhone=Riskresult.mobile.substring(0,3)+"****"+Riskresult.mobile.substring(9,11); 
                $('#persetMobile').text(userPhone)
                if(wpcertFlag!='2' || wpriskFlag!='2'){ //1 已评测，实名认证
                    $('#persetExposure').html(`<img src="../../lib/images/s_right.png">`)//测评
                    $('#persetRestpay').html(` <a href="resetPay.html" id="goResetpay" style="border:none!important;"><span>支付密码</span><i>去修改<img src="../../lib/images/s_right.png"></i></a>`);//修改支付密码
                    $('#persetAttest').html(` <a href="javascript:;"><span>实名认证</span><i>`+Riskresult.userName+`&nbsp;&nbsp;`+Riskresult.certNo+`</i></a>`)//实名认证
                    $('#persetBank').html(`<span>银行卡</span><i>`+Riskresult.bankName+`&nbsp;`+Riskresult.bankCardNo+`</i>`)
                   
                }else{
                    $('#persetBank').html(`<span>银行卡</span><i>未设置</i>`)
                    $('#persetAttest').html(` <a href="../../login/attestation/index.html"><span>实名认证</span><i>去认证<img src="../../lib/images/s_right.png"></i></a>`)//实名认证
                    $('#persetRestpay').html(`<a href="../../login/attestation/index.html" id="goResetpay" style="border:none!important;"><span>支付密码</span><i>未设置<img src="../../lib/images/s_right.png"></i></a>`)//修改支付密码
                    $('#persetExposure').html(`去评测<img src="../../lib/images/s_right.png">`)//测评
                }
           }
        },
        error: function(error){  
            console.log(error,1);  
        }    
    }); 
}else{
    window.location.href="../../login/login.html"
    //console.log(wpcertFlag, wpriskFlag)
}





</script>
</body>
</html>